-- GENERATED SPELL FOR [Unrelenting Construct] --


function spell0_27971(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(51842,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27971', 1283, 1)
end

function spell1_27971(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(59040,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27971', 1268, 1)
end

function spell2_27971(pUnit, Event) --@Short Circuit,Self--
pUnit:FullCastSpellOnTarget(51832,pUnit)
pUnit:RegisterEvent('Sorts_27971', 3000, 1)
end

function spell3_27971(pUnit, Event) --@Short Circuit,Self--
pUnit:FullCastSpellOnTarget(61513,pUnit)
pUnit:RegisterEvent('Sorts_27971', 3000, 1)
end

function spell4_27971(pUnit, Event) --@Unrelenting Strike,n/a--
pUnit:FullCastSpellOnTarget(51491,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27971', 2000, 1)
end

function spell5_27971(pUnit, Event) --@Unrelenting Strike,n/a--
pUnit:FullCastSpellOnTarget(59039,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27971', 2000, 1)
end

function Sorts_27971(pUnit, Event)
local choix_sorts_27971 = math.random(0, 5)
if choix_sorts_27971 == 0 then
pUnit:RegisterEvent('spell0_27971', 1, 1)
end
if choix_sorts_27971 == 1 then
pUnit:RegisterEvent('spell1_27971', 1, 1)
end
if choix_sorts_27971 == 2 then
pUnit:RegisterEvent('spell2_27971', 1, 1)
end
if choix_sorts_27971 == 3 then
pUnit:RegisterEvent('spell3_27971', 1, 1)
end
if choix_sorts_27971 == 4 then
pUnit:RegisterEvent('spell4_27971', 1, 1)
end
if choix_sorts_27971 == 5 then
pUnit:RegisterEvent('spell5_27971', 1, 1)
end
end

function mob27971_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27971', math.random(1500, 3000), 1)
end

function mob27971_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27971_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27971_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27971, 1, 'mob27971_Action')
RegisterUnitEvent(27971, 2, 'mob27971_Leave')
RegisterUnitEvent(27971, 3, 'mob27971_Kill')
RegisterUnitEvent(27971, 4, 'mob27971_Die')
